<template>
  <div>
    <Loading :loading="loading">
      <Form :ref="formRef" :label-width="130" :model="formData" inline>
        <FormItem prop="sn" label="ID:" style="width:30%">
          <Input type="text" v-model="formData.sn" readonly />
        </FormItem>
        <FormItem prop="name" label="账单类型:" style="width:30%">
          <Input type="text" v-model="formData.name" readonly />
        </FormItem>
        <FormItem prop="num" label="商户名称:" style="width:30%">
          <Input type="text" v-model="formData.num" readonly />
        </FormItem>
        <FormItem prop="legalPersonName" label="对账范围:" style="width:30%">
          <Input type="text" v-model="formData.legalPersonName" readonly />
        </FormItem>
        <FormItem prop="contactsName" label="业务渠道:" style="width:30%">
          <Input type="text" v-model="formData.contactsName" readonly />
        </FormItem>
        <FormItem prop="phone" label="对账文件名:" style="width:30%">
          <Input type="text" v-model="formData.phone" readonly />
        </FormItem>
        <FormItem prop="email" label="总金额:" style="width:30%">
          <Input type="text" v-model="formData.email" readonly />
        </FormItem>
        <FormItem prop="businessMobile" label="总退款金额:" style="width:30%">
          <Input type="text" v-model="formData.businessMobile" readonly />
        </FormItem>
        <FormItem prop="bankName" label="总笔数:" style="width:30%">
          <Input type="text" v-model="formData.bankName" readonly />
        </FormItem>
        <FormItem prop="bankAccount" label="总退款笔数:" style="width:30%">
          <Input type="text" v-model="formData.bankAccount" readonly />
        </FormItem>
        <FormItem prop="cityName" label="消费手续费:" style="width:30%">
          <Input type="text" v-model="formData.cityName" readonly />
        </FormItem>
        <FormItem prop="address" label="退款手续费:" style="width:30%">
          <Input type="text" v-model="formData.address" readonly />
        </FormItem>
        
        <FormItem prop="bankName" label="消费结算金额:" style="width:30%">
          <Input type="text" v-model="formData.bankName" readonly />
        </FormItem>
        <FormItem prop="bankAccount" label="退款结算金额:" style="width:30%">
          <Input type="text" v-model="formData.bankAccount" readonly />
        </FormItem>
        <FormItem prop="cityName" label="对账日期:" style="width:30%">
          <Input type="text" v-model="formData.cityName" readonly />
        </FormItem>
        <FormItem prop="address" label="对账开始时间:" style="width:30%">
          <Input type="text" v-model="formData.address" readonly />
        </FormItem>
        <FormItem prop="bankName" label="对账结束时间:" style="width:30%">
          <Input type="text" v-model="formData.bankName" readonly />
        </FormItem>
        <FormItem prop="bankAccount" label="创建时间:" style="width:30%">
          <Input type="text" v-model="formData.bankAccount" readonly />
        </FormItem>
        <FormItem prop="cityName" label="备注:" style="width:30%">
          <Input type="text" v-model="formData.cityName" readonly />
        </FormItem>
        <!-- <FormItem prop="state" label="开票范围:" style="width:30%">
          <Select v-model="formData.state" readonly >
            <Option value="0">无效</Option>
            <Option value="1">有效</Option>
            <Option value="2">禁止开蓝票</Option>
            <Option value="3">禁止冲红</Option>
          </Select>
        </FormItem> -->
        <!-- <Authc permissions="invoice:taxpayerItems:query">
          <FormItem prop="items" label="商品列表:" style="width:90%">
            <ItemsListTable :taxpayerId="taxpayerId" />
          </FormItem>
        </Authc> -->
      </Form>
    </Loading>
  </div>
</template>
<script>
import config from "@/utils/config";
import { namespace } from "../module";
import {InputNumber,Input,Button,Select,Form,FormItem,Message,Option} from "view-design";
import Loading from "@/components/Loading";
import RemoteSelect from "@/components/RemoteSelect";
import RemoteTableSelect from "@/components/RemoteTableSelect";
import SearchBar from "@/components/SearchBar";
import Uuid from "uuid";
import Authc from "@/components/Authc";
export default {
  components: {InputNumber,Loading,Input,Button,Form,FormItem,Message,RemoteSelect,RemoteTableSelect,
    SearchBar,SearchBarItem: SearchBar.SearchBarItem,Select,Option,Authc},
  props: ["id"],
  beforeMount: async function() {
    let id = this.$route.params.id;
    let response = await this.$store.dispatch(`${namespace}/getDetail`, {id: id});
    if (response.errorCode === 0) {
      this.formData = response.data;
    }
  },
  data: function() {
    let vm = this;
    return {
      taxpayerId: this.$route.params.id,
      formRef: Uuid.v1(),
      formData: {},
      columns: []
    };
  },
  methods: {},
  computed: {
    loading: function() {
      let result = this.$store.state[namespace].loading;
      return result;
    }
  }
};
</script>

<style>
</style>
